package com.atom.process.cnmuseum.bm.dao.process;

import java.util.List;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Repository;

import com.atom.common.dao.AvensCommonDao;
import com.atom.common.mb.entity.gl.TrackmessageDO;
import com.atom.common.remote.user.UserUtil;
import com.atom.process.cnmuseum.bm.entity.process.BmTrackmessageProcessDO;

@Repository
public class BmTrackmessageProcessDao extends AvensCommonDao<BmTrackmessageProcessDO>{

	public void createPDO(UserUtil user, String processInstanceId, String biaoTi, TrackmessageDO trackmessage) {
		// TODO Auto-generated method stub
        BmTrackmessageProcessDO pdo = new BmTrackmessageProcessDO();
        BeanUtils.copyProperties(trackmessage, pdo, "id");
        pdo.setProcessId(processInstanceId);
        super.save(pdo);
	}

	public List<BmTrackmessageProcessDO> findByProcessInstanceId(String processId) {
		// TODO Auto-generated method stub
        List<BmTrackmessageProcessDO> list = super.findByProperty("processId", processId);
        return list;
	}

}
